//
//  UIView+Additions.m
//  LiChuan
//
//  Created by zhanshu-叶国帅 on 15/3/31.
//  Copyright (c) 2015年 zhanshu. All rights reserved.
//

#import "UIView+Additions.h"

@implementation UIView (Additions)
-(UIViewController*)viewController
{
    UIResponder *next=[self nextResponder];
    do {
        if ([next isKindOfClass:[UIViewController class]]) {
            return (UIViewController*)next;
        }
        next=[next nextResponder];
    } while (next!=nil);
    return nil;
}
@end
